<script src="<?php echo base_url()?>/public/assets/js/laydate/laydate.js" type="text/javascript"></script>
<div class="row">
	<div class="col-sm-12">
		<div class="space"></div>
        <form action="/nursery/nursery/update" method="post" onsubmit="return yanzheng()">
		<input type="hidden" value="update" name="form_submit" />
		<input type="hidden" value="<?php echo $nursery_info['id']?>" name="id" />
		<table width="100%" class="table table-striped table-bordered table-hover" widtd="100%">
			<tr>
			    <td width="15%" height="30" widtd="15%">园所名称：</td>
				<td width="85%" height="30" align="left" widtd="85%">
				<input type="text" value="<?php echo $nursery_info['title']?>" name="title"/></td>
			</tr>
			<tr>
			  <td height="30">城市：</td>
			  <td height="30" align="left">
			  <select name="sex">
			  	<option value="1">男</option>
			  	<option value="0">女</option>
			  </select>			  </td>
		  </tr>
			<tr>
              <td height="30">地区：</td>
			  <td height="30" align="left"><select name="sex">
                  <option value="1">男</option>
                  <option value="0">女</option>
                </select>              </td>
		  </tr>
			<tr>
			  <td height="30">客服电话：</td>
			  <td height="30" align="left"><input type="text" value="<?php echo $nursery_info['telephone']?>" name="telephone"/></td>
		  </tr>
			<tr>
			  <td height="30">详情地址：</td>
			  <td height="30" align="left"><textarea name="address" style="width:400px"><?php echo $nursery_info['address']?></textarea></td>
		  </tr>
			<tr>
			  <td height="30">服务范围说明：</td>
			  <td height="30" align="left"><textarea name="explain" style="width:400px"><?php echo $nursery_info['explain']?></textarea></td>
		  </tr>
			<tr>
			  <td height="30">是否允许登陆：</td>
			  <td height="30" align="left"><select name="is_allow_login" disabled="disabled">
                <option value="1">允许</option>
                <option value="0">不允许</option>
              </select></td>
		  </tr>
			<tr>
			  <td height="30">是否支持划课：</td>
			  <td height="30" align="left"><select name="is_allow_huake" disabled="disabled">
                <option value="1">支持</option>
                <option value="0">不支持</option>
              </select></td>
		  </tr>
			<tr>
			  <td height="30">创建时间：</td>
			  <td height="30" align="left"><?php echo $nursery_info['create_date']?></td>
		  </tr>
			<tr>
			  <td height="30">修改时间：</td>
			  <td height="30" align="left"><?php echo $nursery_info['update_date']?></td>
		  </tr>
			<tr>
			  <td height="30" colspan="2"><div align="center"><input type="submit" value="提交" /></div></td>
		  </tr>
	  </table>
	  </form>
	</div>
</div>
<script>
function yanzheng(){ 
	if(!$("[name='title']").val()){ 
	    alert('请输入名称！'); 
	    return false; 
	}
	if(!$("[name='address']").val()){ 
	    alert('请输入地址！'); 
	    return false; 
	}
	if(!$("[name='explain']").val()){ 
	    alert('请输入服务范围说明！'); 
	    return false; 
	}
	if(!$("[name='telephone']").val()){ 
	    alert('请输入客服电话！'); 
	    return false; 
	}	
	if(!confirm('确定要修改吗？')){
		return false;
	}
}
function getcourselist(id){
		$.ajax({
    	    type : "get", 
    	    async:false, 
    	    url : "/nursery/coursepackage/getcourselist?course_cate_id="+id, 
    	    dataType : "json", 
    	    success : function(data){
    		    if(data['code'] == 10){
    		    	var content = '';
    		    	var list = data['list'];
    		    	for(var i=0;i<list.length;i++){
    		    		content+= '<option value="'+list[i]['id']+'">'+list[i]['title']+'</option>';
    			    }
    			    $("[name='course_list_id']").html(content);
    			}else{
    				alert(data['msg']);
    			}
    	    }, 
    	    error:function(){
    	        alert('fail'); 
    	    } 
	});
}
</script>
<!--content-->